data<-read.table("merge_GBM_expr_tumor",sep="\t",head=T)
dim(data)
data[1,1:10]
samples<-read.table("geno_samples")
dim(samples)
samples[1]
samples<-as.vecter(samples)
samples<-as.vector(samples)
samples[1]
dim(samples)
samples<-as.vector(samples[,1])
samples[1]
gsub("-","\\.",samples)
samples<-gsub("-","\\.",samples)
ls()
data1<-data[,samples)
data1<-data[,samples]
dim(data1)
data1[,1]
data1[1,]
genes<-read.table("../OV_EQTL/geneloc.txt",sep="\t",head=T)
dime(genes)
dim(genes)
genes[1,]
data1[1,1:10]
as.chracter(genes[,1])[1]
as.character(genes[,1])[1]
data1<-data1[as.character(genes[,1]),]
dim(data1)
data1[1,1:10]
rown<-rownames(data1)
rown<-gsub("\\.",'-',rown)
rown[1:4]
rown<-colnames(data1)
rown<-gsub("\\.",'-',rown)
rown[1:4]
rownames(data1)<- rown
colnames(data1)<- rown
write.table(data1,"gene_expr_commonsamp.txt",sep="\t",quote=F,head=T,col.names=T,row.names=T)
write.table(data1,"gene_expr_commonsamp.txt",sep="\t",quote=F,col.names=T,row.names=T)
savehistory("rearrange_geneexp.R")
